﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Proggy.Web.Cms.PropertyTypes
{
    /// <summary>
    /// Attribute class for property type
    /// </summary>
    [AttributeUsage(AttributeTargets.Class)]
    public class PropertyTypeAttribute : Attribute
    {
        public PropertyTypeAttribute(string friendlyName, string view)//, bool requiresConfigObject, Type configObjectType)
        {
           this.FriendyName = friendlyName;
           this.View = view;
           //this.ConfigObjectType = configObjectType;
        }

        /// <summary>
        /// The friendly name for this property type
        /// </summary>
        public string FriendyName { get; private set; }

        /// <summary>
        /// The view string (either embedded or otherwise)
        /// </summary>
        public string View { get; private set; }

        /// <summary>
        /// If required, the config object type
        /// </summary>
        public Type RequiredConfigObjectType { get; set; }

        ///// <summary>
        ///// If true, requires config object
        ///// </summary>
        //public bool RequiresConfigObject{get;set;}

        ///// <summary>
        ///// The type of the required config object
        ///// </summary>
        //public Type ConfigObjectType { get; set; }
    }
}
